package com.webank.wedatasphere.linkis.metadata.service;

import com.webank.wedatasphere.linkis.metadata.domain.mdq.vo.MdqTablePartitionStatisticInfoVO;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @ClassName: DataSourceTypeService
 * @Description: 描述
 * @author: zys
 * @date: 2021/3/3  12:46
 */
@Service
public interface DataSourceTypeService {
    List<Map<String, Object>> getTablesByDbNameAndUser(String database,Map<String, String> map);
    List<String> getDbsByUser(String userName);
    List<Map<String, Object>> getColumns(String database,Map<String, String> param);
    List<Map<String, Object>> getPartitionKeys(Map<String,String> param);
    List<String> getPartitions(Map<String,String> param);
    String getLocationByDbAndTable(Map<String,String> param);
    Map<String, Object> getTableDesc(Map<String,String> param);
    String getTableSize(Map<String,String> param) throws IOException;
    int getTableFileNum(Map<String,String> param) throws IOException;
    int getPartitionsNum(Map<String,String> param) throws IOException;
    List<MdqTablePartitionStatisticInfoVO> getMdqTablePartitionStatisticInfoVO(Map<String,String> map,List<String> partitions, String tableLocation) throws IOException;
    int dropTable(Map<String,String> param);
}
